<template>
	<view class="brand-series" v-if="list.length > 0">
		<view class="series-content" :style="{backgroundImage:`url(${v.banner_image})`}" v-for="(v,k) in list"
			:key="k">
			<view class="series-product u-flex">
				<view class="li" v-for="(item,index) in v.productList" :key="index" v-if="v.productList.length > 0"
					@click="$emit('seriesClick',item.id)">
					<image class="li-img" :src="item.cover_image" mode=""></image>
					<view class="li-content">
						<view class="li-name">{{item.name}}</view>
						<view class="price">￥{{item.minPriceSpec.original_price}}</view>
						<view class="activity u-flex u-col-end">
							<view class="activity-text">活动价</view>
							<view class="activity-price u-flex u-col-end">
								<span style="font-size: 20rpx;line-height: 20rpx;">￥</span>
								<span style="font-size: 28rpx;line-height: 24rpx;">{{item.minPriceSpec.price}}</span>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		props: {
			list: {
				type: Array,
				default: (() => {
					return [];
				})
			},
		},
		methods: {}
	}
</script>

<style lang="scss">
	.brand-series {
		padding-top: 10rpx;

		.series-content {
			padding: 194rpx 18rpx 20rpx 20rpx;
			box-sizing: border-box;
			background-repeat: no-repeat;
			background-size: cover;
			margin-top: 20rpx;

			.series-product {
				overflow-x: auto;

				.li {
					width: 212rpx;
					height: 392rpx;
					margin-right: 12rpx;
					background-color: #FFFFFF;
					border-radius: 8rpx;
					line-height: 1;

					.li-img {
						width: 212rpx;
						height: 220rpx;
						border-radius: 8rpx 8rpx 0 0;
					}

					.li-content {
						padding: 0 30rpx 22rpx 10rpx;
						box-sizing: border-box;

						.li-name {
							display: -webkit-box;
							-webkit-box-orient: vertical;
							-webkit-line-clamp: 2;
							overflow: hidden;
							padding-top: 10rpx;
							font-size: 24rpx;
						}

						.price {
							font-size: 20rpx;
							color: #888888;
							padding-top: 28rpx;
							text-decoration: line-through;
						}

						.activity {
							line-height: 1;
							padding-top: 12rpx;

							.activity-text {
								flex-shrink: 0;
								font-size: 20rpx;
								padding-right: 10rpx;
							}

							.activity-price {
								color: $base-price-color;
							}
						}
					}
				}

				.li:last-child {
					margin-right: 0;
				}
			}
		}
	}
</style>